import { Controller, Get, Param, ParseIntPipe } from '@nestjs/common'
import { RoleService } from './role.service'

@Controller('role')
export class RoleController {
  constructor(private readonly roleService: RoleService) {}

  @Get()
  findAll() {
    return this.roleService.findAll()
  }

  @Get(':id')
  findOne(@Param('id', ParseIntPipe) rid: number) {
    return this.roleService.findOne(rid)
  }
}
